.class public Lcom/xingbook/park/c/a/g;
.super Landroid/widget/RelativeLayout;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Landroid/widget/TextView;

.field private b:Lcom/xingbook/park/c/a/i;

.field private c:Lcom/xingbook/park/b/b;

.field private d:F

.field private e:Lcom/xingbook/park/c/a/h;


# direct methods
.method public constructor <init>(Landroid/content/Context;FLcom/xingbook/park/c/a/h;)V
    .locals 5

    const/4 v4, -0x1

    const/high16 v3, 0x428c

    invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    iput p2, p0, Lcom/xingbook/park/c/a/g;->d:F

    iput-object p3, p0, Lcom/xingbook/park/c/a/g;->e:Lcom/xingbook/park/c/a/h;

    new-instance v0, Landroid/widget/TextView;

    invoke-direct {v0, p1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/park/c/a/g;->a:Landroid/widget/TextView;

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->a:Landroid/widget/TextView;

    const/16 v1, 0x13

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setGravity(I)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->a:Landroid/widget/TextView;

    const/4 v1, 0x0

    const/high16 v2, 0x41f0

    mul-float/2addr v2, p2

    invoke-virtual {v0, v1, v2}, Landroid/widget/TextView;->setTextSize(IF)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->a:Landroid/widget/TextView;

    const v1, -0x99999a

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    mul-float v1, v3, p2

    float-to-int v1, v1

    invoke-direct {v0, v4, v1}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    const/high16 v1, 0x4230

    mul-float/2addr v1, p2

    float-to-int v1, v1

    iput v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->leftMargin:I

    iget-object v1, p0, Lcom/xingbook/park/c/a/g;->a:Landroid/widget/TextView;

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->a:Landroid/widget/TextView;

    invoke-virtual {p0, v0}, Lcom/xingbook/park/c/a/g;->addView(Landroid/view/View;)V

    const/high16 v0, 0x4220

    mul-float/2addr v0, p2

    float-to-int v0, v0

    sput v0, Lcom/xingbook/park/c/a/i;->a:I

    const/high16 v0, 0x41d0

    mul-float/2addr v0, p2

    float-to-int v0, v0

    sput v0, Lcom/xingbook/park/c/a/i;->b:I

    new-instance v0, Lcom/xingbook/park/c/a/i;

    invoke-direct {v0, p1, p0}, Lcom/xingbook/park/c/a/i;-><init>(Landroid/content/Context;Lcom/xingbook/park/c/a/g;)V

    iput-object v0, p0, Lcom/xingbook/park/c/a/g;->b:Lcom/xingbook/park/c/a/i;

    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v1, 0x1

    invoke-direct {v0, v4, v1}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    mul-float v1, v3, p2

    float-to-int v1, v1

    iput v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->topMargin:I

    iget-object v1, p0, Lcom/xingbook/park/c/a/g;->b:Lcom/xingbook/park/c/a/i;

    invoke-virtual {v1, v0}, Lcom/xingbook/park/c/a/i;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->b:Lcom/xingbook/park/c/a/i;

    invoke-virtual {p0, v0}, Lcom/xingbook/park/c/a/g;->addView(Landroid/view/View;)V

    return-void
.end method

.method static synthetic a(Lcom/xingbook/park/c/a/g;)F
    .locals 1

    iget v0, p0, Lcom/xingbook/park/c/a/g;->d:F

    return v0
.end method

.method static synthetic b(Lcom/xingbook/park/c/a/g;)Lcom/xingbook/park/c/a/i;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->b:Lcom/xingbook/park/c/a/i;

    return-object v0
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 5

    const/4 v2, 0x0

    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    invoke-virtual {p1}, Landroid/view/View;->isSelected()Z

    move-result v0

    if-nez v0, :cond_0

    if-eqz v1, :cond_0

    instance-of v0, v1, Ljava/lang/Integer;

    if-eqz v0, :cond_0

    iget-object v3, p0, Lcom/xingbook/park/c/a/g;->c:Lcom/xingbook/park/b/b;

    move-object v0, v1

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    invoke-virtual {v3, v0}, Lcom/xingbook/park/b/b;->a(I)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->b:Lcom/xingbook/park/c/a/i;

    invoke-virtual {v0}, Lcom/xingbook/park/c/a/i;->getChildCount()I

    move-result v3

    move v0, v2

    :goto_0
    if-lt v0, v3, :cond_1

    const/4 v0, 0x1

    invoke-virtual {p1, v0}, Landroid/view/View;->setSelected(Z)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->e:Lcom/xingbook/park/c/a/h;

    iget-object v2, p0, Lcom/xingbook/park/c/a/g;->c:Lcom/xingbook/park/b/b;

    invoke-virtual {v2}, Lcom/xingbook/park/b/b;->a()Ljava/lang/String;

    move-result-object v2

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    invoke-interface {v0, v2, v1}, Lcom/xingbook/park/c/a/h;->a(Ljava/lang/String;I)V

    :cond_0
    return-void

    :cond_1
    iget-object v4, p0, Lcom/xingbook/park/c/a/g;->b:Lcom/xingbook/park/c/a/i;

    invoke-virtual {v4, v0}, Lcom/xingbook/park/c/a/i;->getChildAt(I)Landroid/view/View;

    move-result-object v4

    invoke-virtual {v4, v2}, Landroid/view/View;->setSelected(Z)V

    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method

.method public setData(Lcom/xingbook/park/b/b;)V
    .locals 12
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "NewApi"
        }
    .end annotation

    iput-object p1, p0, Lcom/xingbook/park/c/a/g;->c:Lcom/xingbook/park/b/b;

    if-eqz p1, :cond_3

    invoke-virtual {p1}, Lcom/xingbook/park/b/b;->c()Ljava/util/HashMap;

    move-result-object v0

    if-eqz v0, :cond_3

    invoke-virtual {p1}, Lcom/xingbook/park/b/b;->c()Ljava/util/HashMap;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/HashMap;->size()I

    move-result v0

    if-lez v0, :cond_3

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/xingbook/park/c/a/g;->setVisibility(I)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->a:Landroid/widget/TextView;

    invoke-virtual {p1}, Lcom/xingbook/park/b/b;->b()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-virtual {p1}, Lcom/xingbook/park/b/b;->c()Ljava/util/HashMap;

    move-result-object v2

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->b:Lcom/xingbook/park/c/a/i;

    invoke-virtual {v0}, Lcom/xingbook/park/c/a/i;->removeAllViews()V

    invoke-virtual {p0}, Lcom/xingbook/park/c/a/g;->getContext()Landroid/content/Context;

    move-result-object v3

    const/4 v0, 0x2

    new-array v0, v0, [[I

    const/4 v1, 0x0

    const/4 v4, 0x1

    new-array v4, v4, [I

    const/4 v5, 0x0

    const v6, 0x10100a1

    aput v6, v4, v5

    aput-object v4, v0, v1

    const/4 v1, 0x1

    const/4 v4, 0x0

    new-array v4, v4, [I

    aput-object v4, v0, v1

    const/4 v1, 0x2

    new-array v1, v1, [I

    fill-array-data v1, :array_0

    new-instance v4, Landroid/content/res/ColorStateList;

    invoke-direct {v4, v0, v1}, Landroid/content/res/ColorStateList;-><init>([[I[I)V

    const/high16 v0, 0x4000

    iget v1, p0, Lcom/xingbook/park/c/a/g;->d:F

    mul-float/2addr v0, v1

    float-to-int v0, v0

    const/4 v1, 0x2

    if-ge v0, v1, :cond_4

    const/4 v0, 0x2

    move v1, v0

    :goto_0
    const/high16 v0, 0x41f0

    iget v5, p0, Lcom/xingbook/park/c/a/g;->d:F

    mul-float/2addr v0, v5

    float-to-int v5, v0

    div-int/lit8 v6, v5, 0x2

    invoke-virtual {v2}, Ljava/util/HashMap;->keySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v7

    :goto_1
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_0

    :goto_2
    return-void

    :cond_0
    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    new-instance v8, Landroid/widget/TextView;

    invoke-direct {v8, v3}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    invoke-virtual {p1}, Lcom/xingbook/park/b/b;->d()I

    move-result v9

    if-ne v0, v9, :cond_1

    const/4 v9, 0x1

    invoke-virtual {v8, v9}, Landroid/widget/TextView;->setSelected(Z)V

    :cond_1
    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v9

    invoke-virtual {v8, v9}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    invoke-virtual {v2, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/CharSequence;

    invoke-virtual {v8, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const/16 v0, 0x11

    invoke-virtual {v8, v0}, Landroid/widget/TextView;->setGravity(I)V

    invoke-virtual {v8, v4}, Landroid/widget/TextView;->setTextColor(Landroid/content/res/ColorStateList;)V

    const/4 v0, 0x0

    const/high16 v9, 0x4200

    iget v10, p0, Lcom/xingbook/park/c/a/g;->d:F

    mul-float/2addr v9, v10

    invoke-virtual {v8, v0, v9}, Landroid/widget/TextView;->setTextSize(IF)V

    new-instance v0, Landroid/graphics/drawable/StateListDrawable;

    invoke-direct {v0}, Landroid/graphics/drawable/StateListDrawable;-><init>()V

    const/4 v9, 0x1

    new-array v9, v9, [I

    const/4 v10, 0x0

    const v11, 0x10100a1

    aput v11, v9, v10

    const v10, -0xe64913

    const/4 v11, -0x1

    invoke-static {v1, v10, v5, v11}, Lcom/xingbook/park/ui/aa;->a(IIII)Landroid/graphics/drawable/GradientDrawable;

    move-result-object v10

    invoke-virtual {v0, v9, v10}, Landroid/graphics/drawable/StateListDrawable;->addState([ILandroid/graphics/drawable/Drawable;)V

    const/4 v9, 0x1

    new-array v9, v9, [I

    const/4 v10, 0x0

    const v11, 0x10100a7

    aput v11, v9, v10

    const v10, -0x171718

    const v11, -0x171718

    invoke-static {v1, v10, v5, v11}, Lcom/xingbook/park/ui/aa;->a(IIII)Landroid/graphics/drawable/GradientDrawable;

    move-result-object v10

    invoke-virtual {v0, v9, v10}, Landroid/graphics/drawable/StateListDrawable;->addState([ILandroid/graphics/drawable/Drawable;)V

    const/4 v9, 0x0

    new-array v9, v9, [I

    const v10, -0x171718

    const/4 v11, -0x1

    invoke-static {v1, v10, v5, v11}, Lcom/xingbook/park/ui/aa;->a(IIII)Landroid/graphics/drawable/GradientDrawable;

    move-result-object v10

    invoke-virtual {v0, v9, v10}, Landroid/graphics/drawable/StateListDrawable;->addState([ILandroid/graphics/drawable/Drawable;)V

    sget v9, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v10, 0x10

    if-lt v9, v10, :cond_2

    invoke-virtual {v8, v0}, Landroid/widget/TextView;->setBackground(Landroid/graphics/drawable/Drawable;)V

    :goto_3
    invoke-virtual {v8, v6, v6, v6, v6}, Landroid/widget/TextView;->setPadding(IIII)V

    const/16 v0, 0x11

    invoke-virtual {v8, v0}, Landroid/widget/TextView;->setGravity(I)V

    new-instance v0, Landroid/view/ViewGroup$LayoutParams;

    const/4 v9, -0x2

    const/high16 v10, 0x428c

    iget v11, p0, Lcom/xingbook/park/c/a/g;->d:F

    mul-float/2addr v10, v11

    float-to-int v10, v10

    invoke-direct {v0, v9, v10}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    invoke-virtual {v8, v0}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/g;->b:Lcom/xingbook/park/c/a/i;

    invoke-virtual {v0, v8}, Lcom/xingbook/park/c/a/i;->addView(Landroid/view/View;)V

    invoke-virtual {v8, p0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto/16 :goto_1

    :cond_2
    invoke-virtual {v8, v0}, Landroid/widget/TextView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_3

    :cond_3
    const/16 v0, 0x8

    invoke-virtual {p0, v0}, Lcom/xingbook/park/c/a/g;->setVisibility(I)V

    goto/16 :goto_2

    :cond_4
    move v1, v0

    goto/16 :goto_0

    nop

    :array_0
    .array-data 0x4
        0xedt 0xb6t 0x19t 0xfft
        0x66t 0x66t 0x66t 0xfft
    .end array-data
.end method
